]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/scroll-view-fade: Fix vertical top fading
authorSebastian Keller <skeller@gnome.org>
Sat, 13 Feb 2021 20:13:57 +0000 (21:13 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sat, 13 Feb 2021 21:00:46 +0000 (21:00 +0000)
The fade for the vertical top edge was calculating the fade ratio for a
larger height (up to where the bottom fade starts) than it was
displaying.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1674>

src/st/st-scroll-view-fade.glsl

index 2eacfd9af541ff6a2f9350bfcfd0e531e069b12b..e3f1a259f36c020a8df15e252943a9232a24ac26 100644 (file)
@@ -55,7 +55,7 @@ void main ()
 
         float vfade_scale = height / vfade_offset;
         if (fade_top) {
-            ratio *= (fade_area_topleft[1] - y) / (fade_area_topleft[1] - fade_bottom_start);
+            ratio *= (fade_area_topleft[1] - y) / (fade_area_topleft[1] - fade_top_start);
         }
 
         if (fade_bottom) {